package com.gitee.zhanyao.codebase.java.globalsetting.controller;

import com.gitee.zhanyao.codebase.java.globalsetting.entity.User;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@CrossOrigin
@RestController
public class UserController {

    @GetMapping("/getUser")
    public User getUser() {
        User user = new User();
        user.setId(1399196290373996545L);
        user.setCreateTime(LocalDateTime.now());
        return user;
    }

    @PostMapping("/getUserPost")
    public User getUserPost() {
        User user = new User();
        user.setId(1399196290373996545L);
        user.setCreateTime(LocalDateTime.now());
        return user;
    }
}
